home *** CD-ROM | disk | FTP | other *** search
/ Euroscene 2 / Euroscene 2.iso / USEFUL / DeliTracker130 / Developer / Developer.run / Examples / MarkII.s < prev    next >
Encoding:
Text File  |  1992-09-23  |  2.2 KB  |  127 lines

  1.  
  2.     incdir    "Includes:"
  3.     include    "misc/DeliPlayer.i"
  4. ;
  5. ;
  6.     SECTION Player,Code
  7. ;
  8. ;
  9.  
  10.     PLAYERHEADER PlayerTagArray
  11.  
  12.     dc.b '$VER: Mark II player module V1.0 (30 Mar 92)',0
  13.     even
  14.  
  15. PlayerTagArray
  16.     dc.l    DTP_PlayerVersion,0
  17.     dc.l    DTP_PlayerName,PName
  18.     dc.l    DTP_Creator,CName
  19.     dc.l    DTP_Check2,Chk
  20.     dc.l    DTP_Interrupt,Int
  21.     dc.l    DTP_InitPlayer,InitPlay
  22.     dc.l    DTP_EndPlayer,EndPlay
  23.     dc.l    DTP_InitSound,InitSnd
  24.     dc.l    DTP_EndSound,RemSnd
  25.     dc.l    TAG_DONE
  26.  
  27. *-----------------------------------------------------------------------*
  28. ;
  29. ; Player/Creatorname und lokale Daten
  30.  
  31. PName    dc.b 'Mark_II',0
  32. CName    dc.b 'Cachet Software,',10
  33.     dc.b 'adapted by Delirium',0
  34.     even
  35. M_data        dc.l 0
  36.  
  37. *-----------------------------------------------------------------------*
  38. ;
  39. ;Interrupt für Replay
  40.  
  41. Int
  42.     movem.l    d0-d7/a0-a6,-(sp)
  43.     move.l    M_data(pc),a0
  44.     moveq    #0,d0
  45.     moveq    #1,d1
  46.     jsr    (a0)                 ; DudelDiDum
  47.     movem.l    (sp)+,d0-d7/a0-a6
  48.     rts
  49.  
  50. *-----------------------------------------------------------------------*
  51. ;
  52. ; Testet, ob es sich um ein Mark-II-Modul handelt
  53.  
  54. Chk
  55.     move.l    dtg_ChkData(a5),a0
  56.  
  57.     moveq    #1,d0                ; Modul nicht erkannt (default)
  58.  
  59.     cmpi.l  #".ZAD",$348(a0)
  60.     bne.s    ChkEnd
  61.     cmpi.l  #"S89.",$34C(a0)
  62.     bne.s    ChkEnd
  63.  
  64.     moveq    #0,d0                ; Modul erkannt
  65. ChkEnd
  66.     rts
  67.  
  68. *-----------------------------------------------------------------------*
  69. ;
  70. ; Init Player
  71.  
  72. InitPlay
  73.     moveq    #0,d0
  74.     move.l    dtg_GetListData(a5),a0        ; Function
  75.     jsr    (a0)
  76.     move.l    a0,M_data
  77.  
  78.     move.l    dtg_AudioAlloc(a5),a0        ; Function
  79.     jsr    (a0)                ; returncode is already set !
  80.     rts
  81.  
  82. *-----------------------------------------------------------------------*
  83. ;
  84. ; End Player
  85.  
  86. EndPlay
  87.     move.l    dtg_AudioFree(a5),a0        ; Function
  88.     jsr    (a0)
  89.     rts
  90.  
  91. *-----------------------------------------------------------------------*
  92. ;
  93. ; Init Sound
  94.  
  95. InitSnd
  96.     move.l    M_data(pc),a0
  97.  
  98.     moveq    #-1,d0
  99.     jsr    (a0)                ; Init Sound
  100.  
  101.     rts
  102.  
  103. *-----------------------------------------------------------------------*
  104. ;
  105. ; Remove Sound
  106.  
  107. RemSnd
  108.     move.l    M_data(pc),a0
  109.  
  110.     moveq    #1,d0
  111.     moveq    #1,d1
  112.     jsr    (a0)                ; Rem Sound
  113.  
  114.     lea    $dff000,a0
  115.     moveq    #0,d0
  116.     move.w    d0,$a8(a0)
  117.     move.w    d0,$b8(a0)
  118.     move.w    d0,$c8(a0)
  119.     move.w    d0,$d8(a0)
  120.     move.w    #$000F,$96(a0)            ; End Sound
  121.  
  122.     rts
  123.  
  124. *-----------------------------------------------------------------------*
  125.  
  126.  
  127.